<template>

  <el-card class="box-card" shadow="hover" @click="goDetail">
    <div class="content">
      <div class="left">
        <div class="hospital_name">
          {{ hospitalInfo.hosname }}
        </div>
        <div class="tip">
          <div class="level">
            <svg t="1703075392157" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"
                 p-id="4250" width="16" height="16">
              <path
                  d="M939.358251 423.424662c-23.01825-37.252439-62.924121-60.779272-107.019409-63.209624-2.755764-0.38681-5.510504-0.579191-8.347109-0.579191l-152.202471-0.121773c6.649444-28.975938 10.015098-58.653865 10.015098-88.657202 0-28.223808-3.213181-57.139372-9.556657-85.952604-0.447185-2.043542-1.098008-4.006244-1.932002-5.866614-15.820314-57.302077-67.37755-96.841605-127.282918-96.841605-72.827679 0-132.081201 59.254545-132.081201 132.081201 0 3.334955 0.132006 6.66991 0.406253 10.015098-2.196015 57.211003-32.108279 109.947088-80.269162 141.363611-14.447037 9.42465-18.524912 28.773324-9.099239 43.220361 9.414417 14.437827 28.752858 18.535145 43.220361 9.099239 65.811892-42.925648 106.429984-115.325585 108.656699-193.684234 0.030699-1.332345-0.010233-2.663666-0.14224-3.996011-0.203638-2.012843-0.304945-4.016477-0.304945-6.019087 0-38.381146 31.233352-69.614497 69.614497-69.614497 32.57593 0 60.474326 22.204721 67.824735 53.997821 0.356111 1.534959 0.823761 3.019777 1.402953 4.453429 4.696975 22.814612 7.076162 45.579081 7.076162 67.743894 0 37.485753-6.222725 74.352405-18.494213 109.592001-3.324722 9.546424-1.819438 20.111037 4.02671 28.345582 5.856381 8.245801 15.332197 13.146415 25.448602 13.156648l193.226816 0.101307c1.423419 0.264013 2.857071 0.426719 4.300956 0.477884 24.116257 0.9967 45.935192 13.614066 58.603723 34.090423 7.838525 12.31242 11.438517 26.800389 10.431583 41.939181-0.080841 0.945535-0.121773 1.911536-0.11154 2.877537 0 0.854461 0.040932 1.697665 0.11154 2.53166 0.010233 0.335644-0.030699 0.661056-0.11154 0.976234-0.101307 0.376577-0.193405 0.772596-0.284479 1.159406l-74.972529 330.391802c-0.914836 1.281179-1.738597 2.6432-2.449795 4.046153-5.937223 11.762905-14.660908 21.48329-25.346271 28.172643-10.746762 6.812149-23.059182 10.614755-35.757388 11.06194-0.854461-0.061398-513.766226-0.224104-513.766226-0.224104-0.467651-0.020466-0.935302-0.030699-1.402953-0.030699 0 0-111.01542 0.172939-112.718201 0.457418-1.932002 0-3.446495-1.50426-3.446495-3.415796l0.299829-416.334173c0-1.901303 1.545192-3.446495 3.01466-3.456728l1.245364 0.121773c1.174756 0.132006 2.653433 0.284479 3.52836 0.193405l83.82822-0.222057 0 339.367221c0 17.253966 13.979386 31.233352 31.233352 31.233352s31.233352-13.979386 31.233352-31.233352L281.009092 435.350273c0-1.778506 0-8.631588 0-10.411117 0-17.253966-13.979386-30.928407-31.233352-30.928407-1.50426 0-117.547183 0.304945-119.402437 0.304945-36.34272 0-65.913199 29.566386-65.913199 65.893756l-0.299829 416.334173c0 36.337603 29.571503 65.902966 65.913199 65.902966 2.541893 0 111.406323-0.457418 111.406323-0.457418 0.457418 0.020466 0.925069 0.030699 1.382487 0.030699 0 0 511.458671 0.274246 512.505513 0.274246 25.469068 0 50.296523-7.197936 71.647807-20.73116 19.612687-12.281721 35.777855-29.881564 46.839795-50.967812 3.660366-5.622044 6.435573-11.875468 8.256034-18.615986 0.11154-0.416486 0.213871-0.823761 0.304945-1.240247l74.881454-330.340637c1.596358-6.212492 2.257413-12.586666 2.00261-18.992563C960.892707 473.366098 953.948551 446.331371 939.358251 423.424662z"
                  fill="#999999" p-id="4251"></path>
              <path
                  d="M450.027553 518.650467c-17.253966 0-31.233352 13.979386-31.233352 31.233352l0 30.470989c0 17.253966 13.979386 31.233352 31.233352 31.233352 17.253966 0 31.233352-13.979386 31.233352-31.233352l0-30.470989C481.260905 532.629853 467.281519 518.650467 450.027553 518.650467z"
                  fill="#999999" p-id="4252"></path>
              <path
                  d="M693.805696 518.650467c-17.253966 0-31.233352 13.979386-31.233352 31.233352l0 30.470989c0 17.253966 13.979386 31.233352 31.233352 31.233352 17.253966 0 31.233352-13.979386 31.233352-31.233352l0-30.470989C725.039048 532.629853 711.058638 518.650467 693.805696 518.650467z"
                  fill="#999999" p-id="4253"></path>
              <path
                  d="M648.940882 660.09492c-14.304797-9.393951-33.592073-5.398964-43.159986 8.763594-0.132006 0.193405-13.614066 19.754926-34.171264 19.754926-19.98824 0-32.423457-18.09717-33.266661-19.368116-9.17087-14.427594-28.254507-18.809391-42.834574-9.770528-14.650675 9.109472-19.155269 28.366048-10.055007 43.016723 11.214413 18.047028 41.96988 48.588625 86.156242 48.588625 43.962258 0 75.104535-30.318516 86.572728-48.222281C667.404396 688.461991 663.216004 669.500127 648.940882 660.09492z"
                  fill="#999999" p-id="4254"></path>
            </svg>
            <span>{{ hospitalInfo.param.hostypeString }}</span>
          </div>
          <div class="time">
            <svg t="1703075486467" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"
                 p-id="5441" width="16" height="16">
              <path
                  d="M766.6 243.6l24.4-48.1 119.5 58.7 10.9-22.2c38.6-78.7 6-174.2-72.7-212.9C810.6 0.4 767.5-2.3 727.2 11.4s-72.8 42.3-91.4 80.3l-10.9 22.2 121.7 59.8-21 41.4c-62.4-38.3-135.5-60.8-214-60.8-78.4 0-151.5 22.5-214 60.8l-21-41.4 121.7-59.8-10.9-22.2C348.7 13 253.2-19.6 174.4 19.1c-38.1 18.7-66.6 51.2-80.3 91.4-13.7 40.3-11 83.4 7.7 121.5l10.9 22.2 119.5-58.7 24.4 48.1c-94.9 75.4-156 191.5-156 321.8 0 140.5 70.9 264.6 178.7 338.7l-47.9 82.7c-3.3 5.7-4.2 12.4-2.5 18.8 1.7 6.4 5.8 11.7 11.4 15 3.8 2.2 8.1 3.4 12.4 3.4 8.8 0 17-4.7 21.4-12.3l47.6-82.1c56.9 29.8 121.4 46.8 189.9 46.8 66 0 128.1-16 183.4-43.7l45.8 79c4.4 7.6 12.6 12.3 21.4 12.3 4.4 0 8.7-1.2 12.4-3.3 5.7-3.3 9.8-8.6 11.5-15 1.7-6.4 0.8-13-2.5-18.7L738 908.3c111.2-73.6 184.7-199.7 184.7-342.8-0.1-130.4-61.2-246.5-156.1-321.9zM511.6 927C312.2 927 150 764.8 150 565.4c0-199.4 162.2-361.6 361.6-361.6 199.4 0 361.6 162.2 361.6 361.6 0 199.4-162.3 361.6-361.6 361.6z m373.8-740.2L693.6 92.6c20.7-25.4 51.8-40.3 85.2-40.3 16.8 0 33 3.8 48.1 11.2 46.1 22.6 69.9 74.2 58.5 123.3zM329.6 92.6l-191.8 94.2c-11.5-49.1 12.3-100.7 58.5-123.3 15.1-7.4 31.3-11.2 48.1-11.2 33.4-0.1 64.5 14.8 85.2 40.3z"
                  fill="" p-id="5442"></path>
              <path
                  d="M585.7 612.8c9.2-14.3 14.7-31.2 14.7-49.5 0-50.8-41.3-92.2-92.2-92.2-17.1 0-32.9 5-46.6 13.1L297.8 319.6c-4.7-4.7-10.9-7.3-17.5-7.3s-12.8 2.6-17.4 7.2c-4.7 4.7-7.3 10.9-7.3 17.4 0 6.6 2.5 12.8 7.2 17.5L427.4 520c-7 13-11.3 27.6-11.3 43.3 0 50.8 41.3 92.2 92.2 92.2 14.6 0 28.2-3.7 40.5-9.8l76 76.4c4.7 4.7 10.9 7.3 17.5 7.3s12.8-2.6 17.5-7.2c9.6-9.6 9.6-25.3 0.1-34.9l-74.2-74.5z m-116.2-84.9c0.1-0.1 0.3-0.1 0.4-0.2 0.3-0.3 0.4-0.7 0.7-1 9.6-9.8 22.9-16 37.7-16 29.1 0 52.7 23.6 52.7 52.7s-23.7 52.7-52.7 52.7-52.7-23.6-52.7-52.7c-0.1-13.8 5.3-26.2 13.9-35.5z"
                  fill="" p-id="5443"></path>
            </svg>
            <span>每天{{ hospitalInfo.bookingRule?.releaseTime }}放号</span>
          </div>
        </div>
      </div>
      <div class="right">
        <img :src="`data:image/jpeg;base64,${hospitalInfo.logoData}`">
      </div>
    </div>
  </el-card>
</template>

<script setup lang="ts">
import {useRouter} from "vue-router";
//创建路由对象
let $router=useRouter();



const goDetail=()=>{
  //点击的卡片的时候，跳转到医院详情页
  $router.push({path:'/hospital/register',query:{hoscode:props.hospitalInfo.hoscode}})

}
//console.log(props.hospitalInfo);
//注意这种在一个组件中只能被调用一次，不可重复调用
//接受父组件传递过来的props->即为已有的医院的数据
let props = defineProps(["hospitalInfo"]);


</script>


<style scoped lang="scss">
.content {
  display: flex;
  justify-content: space-between;

  .right {
    img {
      width: 50px;
      height: 50px;
    }
  }

  .left {
    width: 60%;

    .tip {
      color: #7f7f7f;
      margin-top: 20px;
      display: flex;
      justify-content: space-between;

      .level {

        display: flex;
        align-items: center;

        span {
          margin-right: 5px;
        }
      }

      .time {

        display: flex;
        align-items: center;

        span {
          margin-right: 5px;
        }
      }
    }
  }
}



</style>
